{
  "name": "Case 39: Board Resolution (Complete & Split)",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "value": "1vRO4eeMINpgHv35P0rcJ6gvHUBVouz53",
          "mode": "list",
          "cachedResultName": "Board Meeting MoM",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1vRO4eeMINpgHv35P0rcJ6gvHUBVouz53"
        },
        "event": "fileCreated",
        "options": {}
      },
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        -1360,
        32
      ],
      "id": "f7aeaa6c-31ce-4988-8573-b7d11ea41846",
      "name": "Google Drive Trigger",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "Cf6MNES8JrQntp3r",
          "name": "Google Drive account"
        }
      }
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -1152,
        32
      ],
      "id": "c640e7de-5e76-4a26-8d77-512b1bd0b174",
      "name": "Download PDF",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "Cf6MNES8JrQntp3r",
          "name": "Google Drive account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.cloud.llamaindex.ai/api/v1/parsing/upload",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer llx-7BWYrvPwfUhgdXbZMtaNCsr2O0h7JH4dkHjHisxcvq46bkIj"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -912,
        32
      ],
      "id": "031cd47d-d69a-4ba9-9d6a-0dd60c228ce8",
      "name": "LlamaIndex POST"
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        -720,
        32
      ],
      "id": "fe80e0db-0a39-4ccf-8c42-86dede5832e2",
      "name": "Wait",
      "webhookId": "bd68e731-b676-41e2-b720-562374f7e933"
    },
    {
      "parameters": {
        "url": "=https://api.cloud.llamaindex.ai/api/v1/parsing/job/{{ $node[\"LlamaIndex POST\"].json[\"id\"] }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer llx-7BWYrvPwfUhgdXbZMtaNCsr2O0h7JH4dkHjHisxcvq46bkIj"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -512,
        32
      ],
      "id": "bb1b1957-e20b-4ebc-9aba-3813f35d16da",
      "name": "Check Status"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "SUCCESS",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "SUCCESS"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "PENDING",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "PENDING"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.3,
      "position": [
        -320,
        32
      ],
      "id": "f511a318-1e19-4fac-87d4-07d93b3a5fc9",
      "name": "Status Switch"
    },
    {
      "parameters": {
        "url": "=https://api.cloud.llamaindex.ai/api/v1/parsing/job/{{ $node[\"LlamaIndex POST\"].json[\"id\"] }}/result/markdown",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer llx-7BWYrvPwfUhgdXbZMtaNCsr2O0h7JH4dkHjHisxcvq46bkIj"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -64,
        -64
      ],
      "id": "fb24c75f-f652-4aa4-a811-eee38f38c9c9",
      "name": "Get Markdown"
    },
    {
      "parameters": {
        "text": "={{ $json.markdown }}",
        "attributes": {
          "attributes": [
            {
              "name": "date",
              "description": "The date of the meeting."
            },
            {
              "name": "resolutions",
              "description": "Extract all resolutions. Separate each with a pipe (|). Do NOT use commas."
            },
            {
              "name": "actions",
              "description": "Extract all action items. Separate each with a pipe (|)."
            },
            {
              "name": "owners",
              "description": "Extract all owners. Separate each with a pipe (|)."
            },
            {
              "name": "due_dates",
              "description": "Extract all deadlines. Separate each with a pipe (|)."
            }
          ]
        },
        "options": {
          "systemPromptTemplate": "### ROLE You are a professional Board Secretary and Governance Officer.\n\n### TASK Extract the meeting date, resolutions, action items, assigned owners, and due dates from the provided text.\n\n### OUTPUT FORMAT & CONSTRAINTS\n\n1. Separator: You MUST separate multiple items in a list using only the PIPE character (|). Example: Item 1 | Item 2 | Item 3.\n\n2. Never use commas as separators for the lists.\n\n3. Array Alignment: Ensure that the number of items in the resolutions, actions, owners, and due_dates lists is identical.\n\n4. Placeholders: If a specific owner or due date is not mentioned for an action item, you MUST use the placeholder TBD or N/A. Every action item must have a corresponding resolution, owner, and date.\n\n5. Clean Data: Do not include bullet points or numbering inside the pipe-separated strings."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1.2,
      "position": [
        128,
        -64
      ],
      "id": "679eb0e0-eb83-4b2c-ba7e-9d5dedac894e",
      "name": "Information Extractor"
    },
    {
      "parameters": {
        "jsCode": "const out = $node[\"Information Extractor\"].json.output;\n\n// Split ONLY on the Pipe character to keep dates like \"Jan 30, 2026\" intact\nconst actions = (out.actions || '').split('|').map(s => s.trim()).filter(s => s !== \"\");\nconst resolutions = (out.resolutions || '').split('|').map(s => s.trim());\nconst owners = (out.owners || '').split('|').map(s => s.trim());\nconst dates = (out.due_dates || '').split('|').map(s => s.trim());\n\n// Map to individual rows for Google Sheets\nreturn actions.map((a, i) => ({\n  json: {\n    meeting_date: out.date || \"N/A\",\n    resolution: resolutions[i] || 'N/A',\n    action: a,\n    owner: owners[i] || 'TBD',\n    due_date: dates[i] || 'N/A'\n  }\n}));"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        448,
        -64
      ],
      "id": "3fb4ab8d-2582-490c-9c38-4a625e6af067",
      "name": "Split Logic"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list"
        },
        "builtInTools": {},
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        128,
        144
      ],
      "id": "15625e1b-fb88-444c-86ce-043369ac0905",
      "name": "GPT-4o",
      "credentials": {
        "openAiApi": {
          "id": "ICwxUBbatsF2sDvy",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1P6QzIcUSDkoycnYMgN9EEsD8BmJ-qEBjFt3Tvq-REVI",
          "mode": "list",
          "cachedResultName": "Board Tasks Logger",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1P6QzIcUSDkoycnYMgN9EEsD8BmJ-qEBjFt3Tvq-REVI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1P6QzIcUSDkoycnYMgN9EEsD8BmJ-qEBjFt3Tvq-REVI/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Meeting Date": "={{ $json.meeting_date }}",
            "Resolution Summary": "={{ $json.resolution }}",
            "Action Item": "={{ $json.action }}",
            "Assignee": "={{ $json.owner }}",
            "Due Date": "={{ $json.due_date }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Meeting Date",
              "displayName": "Meeting Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Resolution Summary",
              "displayName": "Resolution Summary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Action Item",
              "displayName": "Action Item",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Assignee",
              "displayName": "Assignee",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Due Date",
              "displayName": "Due Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        640,
        -64
      ],
      "id": "c09db1da-f7d0-4415-bcb7-c5ebd18156ec",
      "name": "Log Rows",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "LOs2dbk9lby0NfDM",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "pinData": {
    "Get Markdown": [
      {
        "json": {
          "markdown": "\n# MINUTES OF THE BOARD OF DIRECTORS MEETING\n\n# HealthBeacon Wellness Pvt Ltd\n\nDate: December 15, 2025\n\nTime: 10:00 AM – 12:00 PM IST\n\nLocation: Boardroom A / Zoom Hybrid\n\n# Attendees:\n\n- Anand Bulusu (CEO &#x26; Chairman)\n- Sarah Jenkins (CFO)\n- David Chen (CTO)\n- Priyanka Rao (Head of Operations)\n\n# 1. Q4 Financial Review\n\nSarah Jenkins presented the Q4 financial performance. There was a lengthy discussion regarding the increase in operational costs in the Southeast Asia sector. David Chen noted that cloud infrastructure costs were higher than anticipated due to the new AI features.\n\n# 2. Formal Resolution: Expansion into Middle East Market\n\nAfter reviewing the market research report, the board engaged in a vote.\n\n- Resolution [RES-2025-09]: The Board hereby approves the strategic expansion into the UAE market starting Q2 2026. A budget of $500,000 is allocated for the initial phase.\n- Action Item: Priyanka Rao to identify three potential local distribution partners in Dubai.\n- Deadline: January 30, 2026.\n\n# 3. Product Roadmap and Agentic AI Integration\n\nAnand Bulusu discussed the transition toward Agentic AI workflows for internal productivity.\n\n- Resolution [RES-2025-10]: The Board approves the migration of the manual invoice processing system to an automated n8n-based RAG workflow.\n- Action Item: David Chen to complete the technical architecture and security audit for the n8n deployment.\n- Deadline: February 15, 2026.\n\n# 4. Corporate Governance &#x26; ESG\n\nThe board discussed the upcoming ESG reporting requirements.\n\n- Action Item: Sarah Jenkins to hire an external ESG auditor to review the 2025 Sustainability Report.\n- Deadline: March 1, 2026.",
          "job_metadata": {
            "credits_used": 0,
            "job_credits_usage": 0,
            "job_pages": 0,
            "job_auto_mode_triggered_pages": 0,
            "job_is_cache_hit": true
          }
        }
      }
    ]
  },
  "connections": {
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Download PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download PDF": {
      "main": [
        [
          {
            "node": "LlamaIndex POST",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LlamaIndex POST": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Status": {
      "main": [
        [
          {
            "node": "Status Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status Switch": {
      "main": [
        [
          {
            "node": "Get Markdown",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Markdown": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GPT-4o": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Split Logic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Logic": {
      "main": [
        [
          {
            "node": "Log Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "f8625245-1293-45c4-9efe-67abf82208d7",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "3a43da28588548e21903e71cf1dc3ddd65c24bf0c62e7e4b77542ffe87ad79c6"
  },
  "id": "tnT30OPHjjOQYGzJ",
  "tags": []
}